import store from '@/store';
import {
	mapState
} from 'vuex';
export default {
	data() {
		return {
			filterUrl: process.env.VUE_APP_FILE_API,
		}
	},
	computed: {
		...mapState(['skin', 'userInfo', 'permslist']),
		themeColor: {
			get() {
				return store.state.themeColor;
			},
			set(val) {
				store.state.themeColor = val;
			}
		},

	},
	methods: {
		domData: function(t, n) {
			var o = this;
			this.$nextTick(function() {
				uni
					.createSelectorQuery()
					.in(o)
					.selectAll(t)
					.boundingClientRect()
					.exec(function(e) {
						n(e[0]);
					});
			});
		},
		//判断是否有模块或按钮权限
		hasPerms(value) {
			let buttonpermsStr = [...this.permslist];
			if (!buttonpermsStr || buttonpermsStr.length == 0) return false
			return buttonpermsStr.includes(value)
		},
	}
}